<template>
  <div>
  <div class="banner" @click="handleBannerClick">
    <img  class="banner-img" src="http://img1.qunarzz.com/sight/p0/1708/2b/2b3b94de99c0a425a3.img.jpg_600x330_b40971b4.jpg" alt="">
    <div class="banner-info">
      <div class="banner-title">八达岭长城(AAAAA景区)</div>
      <div class="banner-number">
        <span class="iconfont">&#xe632;</span>
        39
      </div>
    </div>
  </div>
    <common-gallary
      @close="handleGallaryClose"
      :imgs="imgs"
      v-show="showGallary"></common-gallary>
  </div>
</template>

<script>
import CommonGallary from 'common/gallary/Gallary'
export default {
  name: 'DetailBanner',
  data () {
    return {
      showGallary: false,
      imgs: ['http://img1.qunarzz.com/sight/p0/1708/2b/2b3b94de99c0a425a3.img.jpg_r_800x800_ae28174d.jpg',
        'http://img1.qunarzz.com/sight/p0/1803/f9/f96ac7520e964ad4a3.img.jpg_r_800x800_93b843b1.jpg']
    }
  },
  methods: {
    handleBannerClick () {
      this.showGallary = true
    },
    handleGallaryClose () {
      this.showGallary = false
    }
  },
  components: {
    CommonGallary
  }
}
</script>

<style lang='stylus' scoped>
.banner{
  position: relative;
  overflow: hidden;
  height: 0;
  padding-bottom: 55%;
}
.banner-img{
  width: 100%;
}
  .banner-info{
    display: flex;
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    line-height: .6rem;
    color: #fff;
  }
  .banner-title{
    flex: 1;
    font-size: .32rem;
    padding: 0 .2rem;
  }
  .banner-number{
    padding: 0 .4rem;
    height: .32rem;
    line-height: .32rem;
    border-radius: .2rem;
    background: rgba(0,0,0,.8);
    font-size: .24rem;
    margin-top: .14rem;
  }
</style>
